"#)
.file("src/lib.rs", "")
.file("build.rs", r#"
+ use std::time::Duration;
fn main() {
println!("cargo:foo=bar");
println!("cargo:bar=baz");
- std::thread::sleep_ms(500);
+ std::thread::sleep(Duration::from_millis(500));
}
"#);
a.build();
use cargo::util::Rustc;
use std::ffi::OsStr;
+use std::time::Duration;
mod support;
macro_rules! test {
process(&support::cargo_dir().join("cargo"))
}
-#[allow(deprecated)] // sleep_ms is now deprecated in favor of sleep()
-fn sleep_ms(ms: u32) {
- std::thread::sleep_ms(ms);
+fn sleep_ms(ms: u64) {
+ std::thread::sleep(Duration::from_millis(ms));
}